﻿CREATE VIEW dbo.v_CreditInfo_10
AS
SELECT     Borrower.LoanID, dbo.t_CreditInfo.DatePulled, dbo.t_CreditInfo.ReportXML, dbo.t_CreditInfo.ReportMerged, dbo.t_CreditInfo.ScoreEfx, 
                      dbo.t_CreditInfo.ScoreXpn, dbo.t_CreditInfo.ScoreTU, dbo.t_CreditInfo.ScoreTri, dbo.t_CreditInfo.Chapter7_FileDate, 
                      dbo.t_CreditInfo.Chapter7_SatisfiedDate, dbo.t_CreditInfo.Chapter7_Status, dbo.MaxNum(CONVERT(bit, dbo.t_CreditInfo.Chapter7_Status), 
                      dbo.t_CreditInfo.Chapter7_Count) AS Chapter7_Count, dbo.t_CreditInfo.Chapter13_FileDate, dbo.t_CreditInfo.Chapter13_SatisfiedDate, 
                      dbo.t_CreditInfo.Chapter13_Status, dbo.MaxNum(CONVERT(bit, dbo.t_CreditInfo.Chapter13_Status), dbo.t_CreditInfo.Chapter13_Count) 
                      AS Chapter13_Count, dbo.t_CreditInfo.ForeclosureNOD_FileDate, dbo.t_CreditInfo.ForeclosureNOD_SatisfiedDate, 
                      dbo.t_CreditInfo.ForeclosureNOD_Status, dbo.MaxNum(CONVERT(bit, dbo.t_CreditInfo.ForeclosureNOD_Status), 
                      dbo.t_CreditInfo.ForeclosureNOD_Count) AS ForeclosureNOD_Count, dbo.t_CreditInfo.BK_FC_NOD_Count, dbo.t_CreditInfo.DebtRatio, 
                      dbo.t_CreditInfo.CashReserveMos, dbo.t_CreditInfo.MortgageCount, dbo.t_CreditInfo.MortgageMonthReviewedMax, dbo.t_CreditInfo.MortgageSince, 
                      dbo.t_CreditInfo.MortgageHistory_30, dbo.t_CreditInfo.MortgageHistory_60, dbo.t_CreditInfo.MortgageHistory_90, 
                      dbo.t_CreditInfo.MortgageHistory_120, dbo.t_CreditInfo.TradeLinesTotal, dbo.t_CreditInfo.TradeLinesCount_30, dbo.t_CreditInfo.TradeLinesCount_60, 
                      dbo.t_CreditInfo.TradeLinesCount_90, dbo.t_CreditInfo.TradeLinesCount_120, dbo.t_CreditInfo.ChargeOffsCount, dbo.t_CreditInfo.ChargeOffsAmount, 
                      dbo.t_CreditInfo.TradeLinesCount_ActiveOpen_03, dbo.t_CreditInfo.TradeLinesCount_ActiveOpen_06, 
                      dbo.t_CreditInfo.TradeLinesCount_ActiveOpen_12, dbo.t_CreditInfo.TradeLinesCount_ActiveOpen_24, 
                      dbo.t_CreditInfo.TradeLinesCount_ActiveOpen_12_1000, dbo.t_CreditInfo.TradeLinesCount_ActiveOpen_12_5000, 
                      dbo.t_CreditInfo.TradeLinesCount_MR_24_5000, dbo.t_CreditInfo.PaymentDelayAverage, dbo.t_CreditInfo.MortgageLate, dbo.t_CreditInfo.RepoCount, 
                      dbo.t_CreditInfo.OpenBK, dbo.t_CreditInfo.PhoneUtilityCollection, dbo.t_CreditInfo.SSN_DL, dbo.t_CreditInfo.AddressMatches, dbo.t_CreditInfo.AnyWho, 
                      dbo.t_CreditInfo.DLSuspended
FROM         dbo.t_CreditInfo INNER JOIN
                      dbo.v_Borrower_0 AS Borrower ON dbo.t_CreditInfo.BorrowerID = Borrower.ID

GO
EXECUTE sp_addextendedproperty @name = N'MS_DiagramPane1', @value = N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[28] 4[32] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1[50] 2[25] 3) )"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4[30] 2[40] 3) )"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4[53] 3) )"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1[75] 4) )"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4) )"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Borrower"
            Begin Extent = 
               Top = 6
               Left = 393
               Bottom = 115
               Right = 559
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "t_CreditInfo"
            Begin Extent = 
               Top = 7
               Left = 48
               Bottom = 328
               Right = 355
            End
            DisplayFlags = 280
            TopColumn = 55
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 50
         Width = 284
         Width = 1500
         Width = 1740
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'VIEW', @level1name = N'v_CreditInfo_10';


GO
EXECUTE sp_addextendedproperty @name = N'MS_DiagramPane2', @value = N'= 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 5910
         Alias = 2805
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'VIEW', @level1name = N'v_CreditInfo_10';


GO
EXECUTE sp_addextendedproperty @name = N'MS_DiagramPaneCount', @value = 2, @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'VIEW', @level1name = N'v_CreditInfo_10';

